﻿using System;
using System.Collections.Generic;

namespace Pap.Data
{
    /// <summary>
    /// 
    /// </summary>
    public interface ILoanRepository : IRepository
    {
        #region Customers

        /// <summary>
        /// Gets the customer by ID.
        /// </summary>
        /// <param name="CustomerID">The customer ID.</param>
        /// <returns></returns>
        ICustomer GetCustomerByID(Guid CustomerID);

        /// <summary>
        /// Finds the customers.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ICustomer> FindCustomers(System.Linq.Expressions.Expression<Func<ICustomer, bool>> Where);

        /// <summary>
        /// Creates the customer.
        /// </summary>
        /// <param name="Customer">The customer.</param>
        void CreateCustomer(ICustomer Customer);

        /// <summary>
        /// Deletes the customer.
        /// </summary>
        /// <param name="customer">The customer.</param>
        void DeleteCustomer(ICustomer customer);

        /// <summary>
        /// Deletes the customers.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteCustomers(System.Linq.Expressions.Expression<Func<ICustomer, bool>> Where);
        #endregion

        #region Project

        /// <summary>
        /// Gets all customer loans.
        /// </summary>
        /// <param name="customerID">The customer ID.</param>
        /// <returns></returns>
        IEnumerable<ICustomerLoan> GetAllCustomerLoans(Guid customerID);

        /// <summary>
        /// Gets the name of the project.
        /// </summary>
        /// <param name="projectID">The project ID.</param>
        /// <returns></returns>
        string GetProjectName(Guid projectID);

        /// <summary>
        /// Gets the name of the project stage.
        /// </summary>
        /// <param name="projectStageID">The project stage ID.</param>
        /// <returns></returns>
        int GetProjectStageName(Guid projectStageID);

        #endregion

        #region EducationalLevels

        /// <summary>
        /// Gets the educational level by ID.
        /// </summary>
        /// <param name="EducationalLevelID">The educational level ID.</param>
        /// <returns></returns>
        ILookUpEntity GetEducationalLevelByID(Guid EducationalLevelID);

        /// <summary>
        /// Finds the educational levels.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindEducationalLevels(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the educational level.
        /// </summary>
        /// <param name="City">The city.</param>
        void CreateEducationalLevel(ILookUpEntity City);

        /// <summary>
        /// Deletes the educational levels.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteEducationalLevels(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion

        #region SocialStatuss

        /// <summary>
        /// Gets the social status by ID.
        /// </summary>
        /// <param name="SocialStatusID">The social status ID.</param>
        /// <returns></returns>
        ILookUpEntity GetSocialStatusByID(Guid SocialStatusID);

        /// <summary>
        /// Finds the social statuses.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindSocialStatuses(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the social status.
        /// </summary>
        /// <param name="SocialStatus">The social status.</param>
        void CreateSocialStatus(ILookUpEntity SocialStatus);

        /// <summary>
        /// Deletes the social statuss.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteSocialStatuss(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion

        #region CustomerLoans

        /// <summary>
        /// Gets the customer loan by ID.
        /// </summary>
        /// <param name="CustomerLoanID">The customer loan ID.</param>
        /// <returns></returns>
        ICustomerLoan GetCustomerLoanByID(Guid CustomerLoanID);

        /// <summary>
        /// Finds the customer loans.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ICustomerLoan> FindCustomerLoans(System.Linq.Expressions.Expression<Func<ICustomerLoan, bool>> Where);

        /// <summary>
        /// Creates the customer loan.
        /// </summary>
        /// <param name="CustomerLoan">The customer loan.</param>
        void CreateCustomerLoan(ICustomerLoan CustomerLoan);

        /// <summary>
        /// Deletes the customer loan.
        /// </summary>
        /// <param name="customerLoan">The customer loan.</param>
        void DeleteCustomerLoan(ICustomerLoan customerLoan);

        /// <summary>
        /// Deletes the customer loans.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteCustomerLoans(System.Linq.Expressions.Expression<Func<ICustomerLoan, bool>> Where);

        /// <summary>
        /// Gets the last loan number.
        /// </summary>
        /// <returns></returns>
        int GetLastLoanNumber();

        #endregion

        #region LoanCases

        /// <summary>
        /// Gets the loan case by ID.
        /// </summary>
        /// <param name="loanCaseID">The loan case ID.</param>
        /// <returns></returns>
        ILoanCase GetLoanCaseByID(Guid loanCaseID);

        /// <summary>
        /// Finds the loan cases.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanCase> FindLoanCases(System.Linq.Expressions.Expression<Func<ILoanCase, bool>> where);

        /// <summary>
        /// Creates the loan case.
        /// </summary>
        /// <param name="loanCase">The loan case.</param>
        void CreateLoanCase(ILoanCase loanCase);

        /// <summary>
        /// Deletes the loan cases.
        /// </summary>
        /// <param name="where">The where.</param>
        void DeleteLoanCases(System.Linq.Expressions.Expression<Func<ILoanCase, bool>> where);

        #endregion

        #region BoardLoans


        //IBoardLoan GetBoardLoanByID(Guid BoardLoanID);

        /// <summary>
        /// Finds the board loans.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IBoardLoan> FindBoardLoans(System.Linq.Expressions.Expression<Func<IBoardLoan, bool>> Where);

        /// <summary>
        /// Creates the board loan.
        /// </summary>
        /// <param name="BoardLoan">The board loan.</param>
        void CreateBoardLoan(IBoardLoan BoardLoan);

        /// <summary>
        /// Deletes the board loans.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteBoardLoans(System.Linq.Expressions.Expression<Func<IBoardLoan, bool>> Where);

        #endregion

        #region Board

        /// <summary>
        /// Gets the board by ID.
        /// </summary>
        /// <param name="BoardID">The board ID.</param>
        /// <returns></returns>
        IBoard GetBoardByID(Guid BoardID);

        /// <summary>
        /// Finds the board.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IBoard> FindBoard(System.Linq.Expressions.Expression<Func<IBoard, bool>> Where);

        /// <summary>
        /// Creates the board.
        /// </summary>
        /// <param name="Board">The board.</param>
        void CreateBoard(IBoard Board);

        /// <summary>
        /// Deletes the boards.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteBoards(System.Linq.Expressions.Expression<Func<IBoard, bool>> Where);

        /// <summary>
        /// Gets the last board number.
        /// </summary>
        /// <returns></returns>
        int GetLastBoardNumber();

        #endregion

        #region BoardAttendees


        /// <summary>
        /// Gets the board attendees by ID.
        /// </summary>
        /// <param name="BoardAttendeeID">The board attendee ID.</param>
        /// <returns></returns>
        IBoardAttendee GetBoardAttendeesByID(Guid BoardAttendeeID);

        /// <summary>
        /// Finds the board attendees.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IBoardAttendee> FindBoardAttendees(System.Linq.Expressions.Expression<Func<IBoardAttendee, bool>> Where);

        /// <summary>
        /// Creates the board attendee.
        /// </summary>
        /// <param name="BoardAttendee">The board attendee.</param>
        void CreateBoardAttendee(IBoardAttendee BoardAttendee);

        /// <summary>
        /// Deletes the board attendees.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteBoardAttendees(System.Linq.Expressions.Expression<Func<IBoardAttendee, bool>> Where);

        #endregion

        #region LoanPlaces

        /// <summary>
        /// Gets the loan place by ID.
        /// </summary>
        /// <param name="LoanPlaceID">The loan place ID.</param>
        /// <returns></returns>
        ILookUpEntity GetLoanPlaceByID(Guid LoanPlaceID);

        /// <summary>
        /// Finds the loan places.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindLoanPlaces(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the loan place.
        /// </summary>
        /// <param name="LoanPlace">The loan place.</param>
        void CreateLoanPlace(ILookUpEntity LoanPlace);

        /// <summary>
        /// Deletes the loan places.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLoanPlaces(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion

        #region LegalForms

        /// <summary>
        /// Gets the legal form by ID.
        /// </summary>
        /// <param name="LegalFormID">The legal form ID.</param>
        /// <returns></returns>
        ILookUpEntity GetLegalFormByID(Guid LegalFormID);

        /// <summary>
        /// Finds the legal forms.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindLegalForms(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the legal form.
        /// </summary>
        /// <param name="LegalForm">The legal form.</param>
        void CreateLegalForm(ILookUpEntity LegalForm);

        /// <summary>
        /// Deletes the legal forms.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLegalForms(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion

        #region LoanTypes

        /// <summary>
        /// Gets the loan type by ID.
        /// </summary>
        /// <param name="LoanTypeID">The loan type ID.</param>
        /// <returns></returns>
        ILookUpEntity GetLoanTypeByID(Guid LoanTypeID);

        /// <summary>
        /// Finds the loan types.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindLoanTypes(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the type of the loan.
        /// </summary>
        /// <param name="LoanType">Type of the loan.</param>
        void CreateLoanType(ILookUpEntity LoanType);

        /// <summary>
        /// Deletes the loan types.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLoanTypes(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion

        #region LoanPaymentMethods

        /// <summary>
        /// Gets the loan payment method by ID.
        /// </summary>
        /// <param name="LoanPaymentMethodID">The loan payment method ID.</param>
        /// <returns></returns>
        ILoanPaymentMethod GetLoanPaymentMethodByID(Guid LoanPaymentMethodID);

        /// <summary>
        /// Finds the loan payment methods.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanPaymentMethod> FindLoanPaymentMethods(System.Linq.Expressions.Expression<Func<ILoanPaymentMethod, bool>> Where);

        /// <summary>
        /// Creates the loan payment method.
        /// </summary>
        /// <param name="LoanPaymentMethod">The loan payment method.</param>
        void CreateLoanPaymentMethod(ILoanPaymentMethod LoanPaymentMethod);

        /// <summary>
        /// Deletes the loan payment methods.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLoanPaymentMethods(System.Linq.Expressions.Expression<Func<ILoanPaymentMethod, bool>> Where);

        #endregion

        #region MilitaryStatus

        /// <summary>
        /// Gets the military status by ID.
        /// </summary>
        /// <param name="MilitaryStatusID">The military status ID.</param>
        /// <returns></returns>
        ILookUpEntity GetMilitaryStatusByID(Guid MilitaryStatusID);

        /// <summary>
        /// Finds the military status.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILookUpEntity> FindMilitaryStatus(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        /// <summary>
        /// Creates the military status.
        /// </summary>
        /// <param name="LoanPaymentMethod">The loan payment method.</param>
        void CreateMilitaryStatus(ILookUpEntity LoanPaymentMethod);

        /// <summary>
        /// Deletes the military status.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteMilitaryStatus(System.Linq.Expressions.Expression<Func<ILookUpEntity, bool>> Where);

        #endregion IssuePlace

        #region IssuePlaces

        /// <summary>
        /// Gets the issue place by ID.
        /// </summary>
        /// <param name="IssuePlaceID">The issue place ID.</param>
        /// <returns></returns>
        IIssuePlace GetIssuePlaceByID(Guid IssuePlaceID);

        /// <summary>
        /// Finds the issue places.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IIssuePlace> FindIssuePlaces(System.Linq.Expressions.Expression<Func<IIssuePlace, bool>> Where);

        /// <summary>
        /// Creates the issue places.
        /// </summary>
        /// <param name="IssuePlace">The issue place.</param>
        void CreateIssuePlaces(IIssuePlace IssuePlace);

        /// <summary>
        /// Deletes the issue places.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteIssuePlaces(System.Linq.Expressions.Expression<Func<IIssuePlace, bool>> Where);

        #endregion

        #region CustomerLoanHistories

        /// <summary>
        /// Gets the customer loan history by ID.
        /// </summary>
        /// <param name="CustomerLoanHistoryID">The customer loan history ID.</param>
        /// <returns></returns>
        ICustomerLoanHistory GetCustomerLoanHistoryByID(Guid CustomerLoanHistoryID);

        /// <summary>
        /// Finds the customer histories.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ICustomerLoanHistory> FindCustomerHistories(System.Linq.Expressions.Expression<Func<ICustomerLoanHistory, bool>> Where);

        /// <summary>
        /// Creates the customer loan history.
        /// </summary>
        /// <param name="CustomerLoan">The customer loan.</param>
        void CreateCustomerLoanHistory(ICustomerLoanHistory CustomerLoan);

        /// <summary>
        /// Deletes the customer loan histories.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteCustomerLoanHistories(System.Linq.Expressions.Expression<Func<ICustomerLoanHistory, bool>> Where);

        #endregion

        #region Governates

        /// <summary>
        /// Gets the governate by ID.
        /// </summary>
        /// <param name="GovernateID">The governate ID.</param>
        /// <returns></returns>
        IGovernorate GetGovernateByID(Guid GovernateID);

        /// <summary>
        /// Finds the governates.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IGovernorate> FindGovernates(System.Linq.Expressions.Expression<Func<IGovernorate, bool>> Where);

        /// <summary>
        /// Creates the governate.
        /// </summary>
        /// <param name="Governate">The governate.</param>
        void CreateGovernate(IGovernorate Governate);

        /// <summary>
        /// Deletes the governates.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteGovernates(System.Linq.Expressions.Expression<Func<IGovernorate, bool>> Where);

        #endregion

        #region LoanFeasibilityStudies

        /// <summary>
        /// Gets the loan feasibility study by ID.
        /// </summary>
        /// <param name="LoanFeasibilityStudyID">The loan feasibility study ID.</param>
        /// <returns></returns>
        ILoanFeasibilityStudy GetLoanFeasibilityStudyByID(Guid LoanFeasibilityStudyID);

        /// <summary>
        /// Finds the loan feasibility studies.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanFeasibilityStudy> FindLoanFeasibilityStudies(System.Linq.Expressions.Expression<Func<ILoanFeasibilityStudy, bool>> Where);

        /// <summary>
        /// Creates the loan feasibility study.
        /// </summary>
        /// <param name="study">The study.</param>
        void CreateLoanFeasibilityStudy(ILoanFeasibilityStudy study);

        /// <summary>
        /// Deletes the loan feasibility studies.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLoanFeasibilityStudies(System.Linq.Expressions.Expression<Func<ILoanFeasibilityStudy, bool>> Where);

        #endregion

        #region LoanFeasibilityStudyAttachment

        /// <summary>
        /// Gets the loan feasibility study attachment by ID.
        /// </summary>
        /// <param name="LoanFeasibilityStudyAttachmentID">The loan feasibility study attachment ID.</param>
        /// <returns></returns>
        ILoanFeasibilityStudyAttachment GetLoanFeasibilityStudyAttachmentByID(Guid LoanFeasibilityStudyAttachmentID);

        /// <summary>
        /// Finds the loan feasibility study attachments.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanFeasibilityStudyAttachment> FindLoanFeasibilityStudyAttachments(System.Linq.Expressions.Expression<Func<ILoanFeasibilityStudyAttachment, bool>> Where);

        /// <summary>
        /// Creates the loan feasibility study attachment.
        /// </summary>
        /// <param name="StudyAttachment">The study attachment.</param>
        void CreateLoanFeasibilityStudyAttachment(ILoanFeasibilityStudyAttachment StudyAttachment);

        /// <summary>
        /// Deletes the loan feasibility study attachment.
        /// </summary>
        /// <param name="StudyAttachment">The study attachment.</param>
        void DeleteLoanFeasibilityStudyAttachment(ILoanFeasibilityStudyAttachment StudyAttachment);

        #endregion

        #region LoanSocialResearches

        /// <summary>
        /// Gets the loan social research by ID.
        /// </summary>
        /// <param name="LoanSocialResearchID">The loan social research ID.</param>
        /// <returns></returns>
        ILoanSocialResearch GetLoanSocialResearchByID(Guid LoanSocialResearchID);

        /// <summary>
        /// Finds the loan social researches.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanSocialResearch> FindLoanSocialResearches(System.Linq.Expressions.Expression<Func<ILoanSocialResearch, bool>> Where);

        /// <summary>
        /// Creates the loan social research.
        /// </summary>
        /// <param name="study">The study.</param>
        void CreateLoanSocialResearch(ILoanSocialResearch study);

        /// <summary>
        /// Deletes the loan social researches.
        /// </summary>
        /// <param name="Where">The where.</param>
        void DeleteLoanSocialResearches(System.Linq.Expressions.Expression<Func<ILoanSocialResearch, bool>> Where);

        #endregion

        #region LoanSocialResearchAttachment

        /// <summary>
        /// Gets the loan social research attachment by ID.
        /// </summary>
        /// <param name="LoanSocialResearchAttachmentID">The loan social research attachment ID.</param>
        /// <returns></returns>
        ILoanSocialResearchAttachment GetLoanSocialResearchAttachmentByID(Guid LoanSocialResearchAttachmentID);

        /// <summary>
        /// Finds the loan social research attachments.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanSocialResearchAttachment> FindLoanSocialResearchAttachments(System.Linq.Expressions.Expression<Func<ILoanSocialResearchAttachment, bool>> Where);

        /// <summary>
        /// Creates the loan social research attachment.
        /// </summary>
        /// <param name="researchAttachment">The research attachment.</param>
        void CreateLoanSocialResearchAttachment(ILoanSocialResearchAttachment researchAttachment);

        /// <summary>
        /// Deletes the loan social research attachment.
        /// </summary>
        /// <param name="researchAttachment">The research attachment.</param>
        void DeleteLoanSocialResearchAttachment(ILoanSocialResearchAttachment researchAttachment);

        #endregion

        #region Board
        /// <summary>
        /// Gets the board attachment.
        /// </summary>
        /// <param name="BoardAttachment">The board attachment.</param>
        /// <returns></returns>
        IBoardAttachment GetBoardAttachment(Guid BoardAttachment);

        /// <summary>
        /// Finds the board attachments.
        /// </summary>
        /// <param name="Where">The where.</param>
        /// <returns></returns>
        IEnumerable<IBoardAttachment> FindBoardAttachments(System.Linq.Expressions.Expression<Func<IBoardAttachment, bool>> Where);

        /// <summary>
        /// Creates the board attachment.
        /// </summary>
        /// <param name="BoardAttachment">The board attachment.</param>
        void CreateBoardAttachment(IBoardAttachment BoardAttachment);

        /// <summary>
        /// Deletes the board attachment.
        /// </summary>
        /// <param name="BoardAttachment">The board attachment.</param>
        void DeleteBoardAttachment(IBoardAttachment BoardAttachment);

        #endregion

        #region LoanExecution

        /// <summary>
        /// Gets the loan execution.
        /// </summary>
        /// <param name="loanExecutionID">The loan execution ID.</param>
        /// <returns></returns>
        ILoanExecution GetLoanExecution(Guid loanExecutionID);

        /// <summary>
        /// Finds the loan executions.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanExecution> FindLoanExecutions(System.Linq.Expressions.Expression<Func<ILoanExecution, bool>> where);

        /// <summary>
        /// Creates the loan execution.
        /// </summary>
        /// <param name="loanExecution">The loan execution.</param>
        void CreateLoanExecution(ILoanExecution loanExecution);

        /// <summary>
        /// Deletes the loan execution.
        /// </summary>
        /// <param name="loanExecution">The loan execution.</param>
        void DeleteLoanExecution(ILoanExecution loanExecution);

        /// <summary>
        /// Finds the loan execution attachments.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanExecutionAttachment> FindLoanExecutionAttachments(System.Linq.Expressions.Expression<Func<ILoanExecutionAttachment, bool>> where);

        /// <summary>
        /// Creates the loan execution attachment.
        /// </summary>
        /// <param name="attachment">The attachment.</param>
        void CreateLoanExecutionAttachment(ILoanExecutionAttachment attachment);

        /// <summary>
        /// Deletes the loan executon attachment.
        /// </summary>
        /// <param name="attachment">The attachment.</param>
        void DeleteLoanExecutonAttachment(ILoanExecutionAttachment attachment);

        #endregion

        #region LoanExecutionInstallment

        /// <summary>
        /// Gets the loan execution installment.
        /// </summary>
        /// <param name="loanExecutionInstallmentID">The loan execution installment ID.</param>
        /// <returns></returns>
        ILoanExecutionInstallment GetLoanExecutionInstallment(Guid loanExecutionInstallmentID);

        /// <summary>
        /// Finds the loan execution installments.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanExecutionInstallment> FindLoanExecutionInstallments(System.Linq.Expressions.Expression<Func<ILoanExecutionInstallment, bool>> where);

        /// <summary>
        /// Creates the loan execution installment.
        /// </summary>
        /// <param name="loanExecutionInstallment">The loan execution installment.</param>
        void CreateLoanExecutionInstallment(ILoanExecutionInstallment loanExecutionInstallment);

        /// <summary>
        /// Deletes the loan execution installment.
        /// </summary>
        /// <param name="loanExecutionInstallment">The loan execution installment.</param>
        void DeleteLoanExecutionInstallment(ILoanExecutionInstallment loanExecutionInstallment);

        #endregion

        #region LoanIntstallmentWarning

        /// <summary>
        /// Gets the loan installment warning.
        /// </summary>
        /// <param name="LoanIntstallmentWarningID">The loan intstallment warning ID.</param>
        /// <returns></returns>
        ILoanInstallmentWarning GetLoanInstallmentWarning(Guid LoanIntstallmentWarningID);

        /// <summary>
        /// Finds the loan installment warnings.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanInstallmentWarning> FindLoanInstallmentWarnings(System.Linq.Expressions.Expression<Func<ILoanInstallmentWarning, bool>> where);

        /// <summary>
        /// Creates the loan installment warning.
        /// </summary>
        /// <param name="loanInstallmentWarning">The loan installment warning.</param>
        void CreateLoanInstallmentWarning(ILoanInstallmentWarning loanInstallmentWarning);

        /// <summary>
        /// Deletes the loan installment warning.
        /// </summary>
        /// <param name="where">The where.</param>
        void DeleteLoanInstallmentWarning(System.Linq.Expressions.Expression<Func<ILoanInstallmentWarning, bool>> where);

        #endregion

        #region LoanInstallmentWarningAttachment

        /// <summary>
        /// Gets the loan installment warning attachment.
        /// </summary>
        /// <param name="LoanInstallmentWarningAttachmentID">The loan installment warning attachment ID.</param>
        /// <returns></returns>
        ILoanInstallmentWarningAttachment GetLoanInstallmentWarningAttachment(Guid LoanInstallmentWarningAttachmentID);

        /// <summary>
        /// Finds the loan installment warning attachment.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanInstallmentWarningAttachment> FindLoanInstallmentWarningAttachment(System.Linq.Expressions.Expression<Func<ILoanInstallmentWarningAttachment, bool>> where);

        /// <summary>
        /// Creates the loan installment warning attachment.
        /// </summary>
        /// <param name="loanInstallmentWarningAttachment">The loan installment warning attachment.</param>
        void CreateLoanInstallmentWarningAttachment(ILoanInstallmentWarningAttachment loanInstallmentWarningAttachment);

        /// <summary>
        /// Deletes the loan installment warning attachment.
        /// </summary>
        /// <param name="where">The where.</param>
        void DeleteLoanInstallmentWarningAttachment(System.Linq.Expressions.Expression<Func<ILoanInstallmentWarningAttachment, bool>> where);

        #endregion

        #region LoanInstallmentPayment

        /// <summary>
        /// Gets the loan installment payment.
        /// </summary>
        /// <param name="loanExecutionInstallmentID">The loan execution installment ID.</param>
        /// <returns></returns>
        ILoanInstallmentPayment GetLoanInstallmentPayment(Guid loanExecutionInstallmentID);

        /// <summary>
        /// Finds the loan installment payments.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanInstallmentPayment> FindLoanInstallmentPayments(System.Linq.Expressions.Expression<Func<ILoanInstallmentPayment, bool>> where);

        /// <summary>
        /// Creates the loan installment payment.
        /// </summary>
        /// <param name="LoanInstallmentPayment">The loan installment payment.</param>
        void CreateLoanInstallmentPayment(ILoanInstallmentPayment LoanInstallmentPayment);

        /// <summary>
        /// Deletes the loan installment payment.
        /// </summary>
        /// <param name="LoanInstallmentPayment">The loan installment payment.</param>
        void DeleteLoanInstallmentPayment(ILoanInstallmentPayment LoanInstallmentPayment);

        #endregion

        #region LoanCancellingDebt

        /// <summary>
        /// Gets the loan cancelling debt.
        /// </summary>
        /// <param name="loanCancellingDebtID">The loan cancelling debt ID.</param>
        /// <returns></returns>
        ILoanCancellingDebt GetLoanCancellingDebt(Guid loanCancellingDebtID);

        /// <summary>
        /// Finds the loan cancelling debts.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanCancellingDebt> FindLoanCancellingDebts(System.Linq.Expressions.Expression<Func<ILoanCancellingDebt, bool>> where);

        /// <summary>
        /// Creates the loan cancelling debt.
        /// </summary>
        /// <param name="loanCancellingDebt">The loan cancelling debt.</param>
        void CreateLoanCancellingDebt(ILoanCancellingDebt loanCancellingDebt);

        /// <summary>
        /// Deletes the loan cancelling debts.
        /// </summary>
        /// <param name="where">The where.</param>
        void DeleteLoanCancellingDebts(System.Linq.Expressions.Expression<Func<ILoanCancellingDebt, bool>> where);

        #endregion

        #region LoanCancellingDebtAttachments

        /// <summary>
        /// Gets the loan cancelling debt attachment.
        /// </summary>
        /// <param name="loanCancellingDebtAttachmentID">The loan cancelling debt attachment ID.</param>
        /// <returns></returns>
        ILoanCancellingDebtAttachment GetLoanCancellingDebtAttachment(Guid loanCancellingDebtAttachmentID);

        /// <summary>
        /// Finds the loan cancelling debt attachments.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<ILoanCancellingDebtAttachment> FindLoanCancellingDebtAttachments(System.Linq.Expressions.Expression<Func<ILoanCancellingDebtAttachment, bool>> where);

        /// <summary>
        /// Creates the loan cancelling debt attachment.
        /// </summary>
        /// <param name="loanCancellingDebtAttachment">The loan cancelling debt attachment.</param>
        void CreateLoanCancellingDebtAttachment(ILoanCancellingDebtAttachment loanCancellingDebtAttachment);

        /// <summary>
        /// Deletes the loan cancelling debt attachments.
        /// </summary>
        /// <param name="where">The where.</param>
        void DeleteLoanCancellingDebtAttachments(System.Linq.Expressions.Expression<Func<ILoanCancellingDebtAttachment, bool>> where);

        #endregion

        #region Images

        /// <summary>
        /// Finds the images.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<IImage> FindImages(System.Linq.Expressions.Expression<Func<IImage, bool>> where);
        /// <summary>
        /// Creates the image.
        /// </summary>
        /// <param name="image">The image.</param>
        void CreateImage(IImage image);

        #endregion

        #region Receipts

        /// <summary>
        /// Finds the receipts.
        /// </summary>
        /// <param name="where">The where.</param>
        /// <returns></returns>
        IEnumerable<IReceipt> FindReceipts(System.Linq.Expressions.Expression<Func<IReceipt, bool>> where);

        #endregion


    }
}
